home *** CD-ROM | disk | FTP | other *** search
- Path: news.iastate.edu!usenet
- From: Mark Vellinga <vellinga@nwciowa.edu>
- Newsgroups: comp.lang.c++
- Subject: Turbo C++ and Printing in Win and Win95
- Date: 4 Jan 1996 20:35:01 GMT
- Organization: Northwestern College
- Message-ID: <4chdll$f87@news.iastate.edu>
- NNTP-Posting-Host: markv.nwciowa.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- I cannot print the output of my program from Turbo C++ 4.5 to a
- printer. I wish to print the output to a network printer.
- Please help.
-
- Please send reply to me directly.
-
- My program is listed below.
-
- Thanks,
- Mark
- vellinga@nwciowa.edu
-
-
- #include <iostream.h>
- #include <fstream.h>
-
- ofstream fileout("prn:");
- void main()
- {
- const float PI=3.1415926536;
- float radius, area;
-
- cout<<"Please enter the radius of a circle: ";
- cin>>radius;
- cout=fileout;
- area=PI*radius*radius;
- cout<<endl<<endl;
- cout<<"Given a radius of "<<radius<<", ";
- cout<<"the area of the circle is "<<area<<".";
- cout<<endl<<endl<<"Thanks for using this Program!!"<<endl;
- }
-
-
-
-